package org.cybzacg.convert.converters.numeric;

import org.cybzacg.convert.annotation.Converter;
import org.cybzacg.convert.enums.ConversionPriority;
import org.cybzacg.convert.enums.ConversionType;
import lombok.extern.slf4j.Slf4j;

/**
 * 双精度浮点型转换器
 * 
 * <p>
 * 专门处理double和Double类型的转换。
 * 继承自 {@link AbstractNumericConverter}，复用通用数值转换逻辑。
 * 
 * <p>
 * 支持的转换：
 * <ul>
 * <li>Number类型 → Double</li>
 * <li>String → Double</li>
 * <li>Boolean → Double (true=1.0, false=0.0)</li>
 * <li>Character → Double (字符码)</li>
 * </ul>
 *
 * @author cybzacg.blog
 * @version 4.0
 * @since 3.0
 */
@Slf4j
@Converter(name = "DoubleConverter", priority = ConversionPriority.HIGH, description = "双精度浮点型转换器，专门处理double和Double类型的转换", enabled = true, version = "4.0", author = "cybzacg.blog", supportedTypes = {
        Double.class, double.class }, tags = { "double", "numeric", "basic", "conversion" })
public class DoubleConverter extends AbstractNumericConverter<Double> {

    /**
     * 构造函数
     */
    public DoubleConverter() {
        super(Double.class);
    }

    @Override
    protected ConversionType getConversionType() {
        return ConversionType.DOUBLE;
    }
}
